home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 3 / Amiga Format CD03 (1996-07-04)(Future Publishing)(GB)(Track 1 of 6)[!][issue 1996-08].iso / comms / netsoftware / amitcp2_x_gcc.lha / errlst.c < prev    next >
C/C++ Source or Header  |  1994-01-11  |  7KB  |  158 lines

  1. /*
  2.  * errlst.c -- network errno support for AmiTCP/IP
  3.  *             defines __sys_errlist[] and __sys_nerr 
  4.  *          or defines sys_errlist[] and sys_nerr 
  5.  *
  6.  * This replaces SAS/C sys_errlist with BSD sys_errlist
  7.  *
  8.  * Author: ppessi <Pekka.Pessi@hut.fi>
  9.  *
  10.  * Copyright © 1993 AmiTCP/IP Group, <amitcp-group@hut.fi>
  11.  *                  Helsinki University of Technology, Finland.
  12.  *                  All rights reserved.
  13.  *
  14.  * Created      : Sat Mar 20 02:04:29 1993 ppessi
  15.  * Last modified: Fri Jun  4 02:18:04 1993 ppessi
  16.  *
  17.  */
  18.  
  19. #include <errno.h>
  20.  
  21. const char *const __sys_errlist[] =
  22. {
  23.   "Undefined error: 0",        /*  0 - ENOERROR */
  24.   "Operation not permitted",    /*  1 - EPERM */
  25.   "No such file or directory",    /*  2 - ENOENT */
  26.   "No such process",        /*  3 - ESRCH */
  27.   "Interrupted system call",    /*  4 - EINTR */
  28.   "Input/output error",        /*  5 - EIO */
  29.   "Device not configured",    /*  6 - ENXIO */
  30.   "Argument list too long",    /*  7 - E2BIG */
  31.   "Exec format error",        /*  8 - ENOEXEC */
  32.   "Bad file descriptor",    /*  9 - EBADF */
  33.   "No child processes",        /* 10 - ECHILD */
  34.   "Resource deadlock avoided",    /* 11 - EDEADLK */
  35.   "Cannot allocate memory",    /* 12 - ENOMEM */
  36.   "Permission denied",        /* 13 - EACCES */
  37.   "Bad address",        /* 14 - EFAULT */
  38.   "Block device required",    /* 15 - ENOTBLK */
  39.   "Device busy",        /* 16 - EBUSY */
  40.   "File exists",        /* 17 - EEXIST */
  41.   "Cross-device link",        /* 18 - EXDEV */
  42.   "Operation not supported by device",    /* 19 - ENODEV */
  43.   "Not a directory",        /* 20 - ENOTDIR */
  44.   "Is a directory",        /* 21 - EISDIR */
  45.   "Invalid argument",        /* 22 - EINVAL */
  46.   "Too many open files in system",    /* 23 - ENFILE */
  47.   "Too many open files",    /* 24 - EMFILE */
  48.   "Inappropriate ioctl for device",    /* 25 - ENOTTY */
  49.   "Text file busy",        /* 26 - ETXTBSY */
  50.   "File too large",        /* 27 - EFBIG */
  51.   "No space left on device",    /* 28 - ENOSPC */
  52.   "Illegal seek",        /* 29 - ESPIPE */
  53.   "Read-only file system",    /* 30 - EROFS */
  54.   "Too many links",        /* 31 - EMLINK */
  55.   "Broken pipe",        /* 32 - EPIPE */
  56.  
  57. /* math software */
  58.   "Numerical argument out of domain",    /* 33 - EDOM */
  59.   "Result too large",        /* 34 - ERANGE */
  60. /* non-blocking and interrupt i/o */
  61.   "Resource temporarily unavailable",    /* 35 - EAGAIN */
  62.                         /* 35 - EWOULDBLOCK */
  63.   "Operation now in progress",    /* 36 - EINPROGRESS */
  64.   "Operation already in progress",    /* 37 - EALREADY */
  65.  
  66. /* ipc/network software -- argument errors */
  67.   "Socket operation on non-socket",    /* 38 - ENOTSOCK */
  68.   "Destination address required",    /* 39 - EDESTADDRREQ */
  69.   "Message too long",        /* 40 - EMSGSIZE */
  70.   "Protocol wrong type for socket",    /* 41 - EPROTOTYPE */
  71.   "Protocol not available",    /* 42 - ENOPROTOOPT */
  72.   "Protocol not supported",    /* 43 - EPROTONOSUPPORT */
  73.   "Socket type not supported",    /* 44 - ESOCKTNOSUPPORT */
  74.   "Operation not supported",    /* 45 - EOPNOTSUPP */
  75.   "Protocol family not supported",    /* 46 - EPFNOSUPPORT */
  76.                         /* 47 - EAFNOSUPPORT */
  77.   "Address family not supported by protocol family",
  78.   "Address already in use",    /* 48 - EADDRINUSE */
  79.   "Can't assign requested address",    /* 49 - EADDRNOTAVAIL */
  80.  
  81. /* ipc/network software -- operational errors */
  82.   "Network is down",        /* 50 - ENETDOWN */
  83.   "Network is unreachable",    /* 51 - ENETUNREACH */
  84.   "Network dropped connection on reset",    /* 52 - ENETRESET */
  85.   "Software caused connection abort",    /* 53 - ECONNABORTED */
  86.   "Connection reset by peer",    /* 54 - ECONNRESET */
  87.   "No buffer space available",    /* 55 - ENOBUFS */
  88.   "Socket is already connected",    /* 56 - EISCONN */
  89.   "Socket is not connected",    /* 57 - ENOTCONN */
  90.   "Can't send after socket shutdown",    /* 58 - ESHUTDOWN */
  91.   "Too many references: can't splice",    /* 59 - ETOOMANYREFS */
  92.   "Connection timed out",    /* 60 - ETIMEDOUT */
  93.   "Connection refused",        /* 61 - ECONNREFUSED */
  94.  
  95.   "Too many levels of symbolic links",    /* 62 - ELOOP */
  96.   "File name too long",        /* 63 - ENAMETOOLONG */
  97.  
  98. /* should be rearranged */
  99.   "Host is down",        /* 64 - EHOSTDOWN */
  100.   "No route to host",        /* 65 - EHOSTUNREACH */
  101.   "Directory not empty",    /* 66 - ENOTEMPTY */
  102.  
  103. /* quotas & mush */
  104.   "Too many processes",        /* 67 - EPROCLIM */
  105.   "Too many users",        /* 68 - EUSERS */
  106.   "Disc quota exceeded",    /* 69 - EDQUOT */
  107.  
  108. /* Network File System */
  109.   "Stale NFS file handle",    /* 70 - ESTALE */
  110.   "Too many levels of remote in path",    /* 71 - EREMOTE */
  111.   "RPC struct is bad",        /* 72 - EBADRPC */
  112.   "RPC version wrong",        /* 73 - ERPCMISMATCH */
  113.   "RPC prog. not avail",    /* 74 - EPROGUNAVAIL */
  114.   "Program version wrong",    /* 75 - EPROGMISMATCH */
  115.   "Bad procedure for program",    /* 76 - EPROCUNAVAIL */
  116.  
  117.   "No locks available",        /* 77 - ENOLCK */
  118.   "Function not implemented",    /* 78 - ENOSYS */
  119.   "Inappropriate file type or format",    /* 79 - EFTYPE */
  120. };
  121.  
  122. const int __sys_nerr =
  123. {sizeof __sys_errlist / sizeof __sys_errlist[0]};
  124.  
  125.  
  126. /*
  127.  * Copyright (c) 1982, 1985 Regents of the University of California.
  128.  * All rights reserved.
  129.  *
  130.  * Redistribution and use in source and binary forms, with or without
  131.  * modification, are permitted provided that the following conditions
  132.  * are met:
  133.  * 1. Redistributions of source code must retain the above copyright
  134.  *    notice, this list of conditions and the following disclaimer.
  135.  * 2. Redistributions in binary form must reproduce the above copyright
  136.  *    notice, this list of conditions and the following disclaimer in the
  137.  *    documentation and/or other materials provided with the distribution.
  138.  * 3. All advertising materials mentioning features or use of this software
  139.  *    must display the following acknowledgement:
  140.  *      This product includes software developed by the University of
  141.  *      California, Berkeley and its contributors.
  142.  * 4. Neither the name of the University nor the names of its contributors
  143.  *    may be used to endorse or promote products derived from this software
  144.  *    without specific prior written permission.
  145.  *
  146.  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  147.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  148.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  149.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  150.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  151.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  152.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  153.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  154.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  155.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  156.  * SUCH DAMAGE.
  157.  */
  158.